<!DOCTYPE html>
<html lang="zh">

<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Document</title>
  <link rel="icon" href="atk_logo.ico">

  <style>
    html,
    body {
      height: 100%;
      width: 100%;
    }

    * {
      margin: 0;
      padding: 0;
    }



    .container {
      width: 100%;
      height: 100%;
      display: inline-flex;
      flex-wrap: wrap;
      background: yellow;
    }
  </style>
</head>


<body>
  <div class="container">

  </div>
</body>
<script src="./jsrsasign.js"></script>
<script>
  function getJwks(res) {
    let { value, keys, jwksKid } = res
    const data = keys.filter((item) => item.kid === jwksKid)[0];
    const { kty, e, n } = data;
    try {
      let rsaPublicKey = KEYUTIL.getKey({
        kty,
        e,
        n,
      });
      const encrypt = KJUR.crypto.Cipher.encrypt(value, rsaPublicKey, "RSA");
      onLogin.postMessage(encrypt);
      console.log(encrypt, '----------->login__Success')
    } catch (error) {
      console.log(encrypt, '----------->login__error')
    }
  }
</script>

</html>